package cn.zero.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

@Entity
@Table(name = "t_wallet", indexes = { @Index(columnList = "userId", unique = true, name = "index_userId") })
public class Wallet extends BaseModel {

	private static final long serialVersionUID = 5505275308349749958L;

	@Column(columnDefinition = "varchar(1024) comment '私钥'")
	private String privateKey;
	@Column(columnDefinition = "varchar(1024) comment '公钥'")
	private String publicKey;

	@Column(columnDefinition = "decimal(12, 2) default 0.00 comment '余额'")
	private double balance;
	private Long userId;

	public String getPrivateKey() {
		return privateKey;
	}

	public void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}

	public String getPublicKey() {
		return publicKey;
	}

	public void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

}
